from selenium import webdriver

path = "chromedriver.exe"
url = "https://www.baidu.com"

browse = webdriver.Chrome(path)
browse.get(url)
input = browse.find_element_by_id('su')
# 获取标签的属性信息
print(input.get_attribute('class'))
# 获取标签名称
print(input.tag_name)
# 获取两个标签中的文本   <input value='提交'/> 不能直接获取到input的value值
print(input.text)
a = browse.find_element_by_link_text('直播')
print(a.text)
